﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace ExcelUtli
{
     class LogWrite
    {        public static void WriteLog(string strFileName, string strLog)
        {
            try
            {
                File.AppendAllText(strFileName, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + ":" + strLog + "\r\n", Encoding.Default);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }
        public static void WriteLog(string strLog)
        {
            string strFileName = IniOpr.IniAppPath() + DateTime.Now.ToString("yyMMdd") + "Serial.Log";
            LogWrite.WriteLog(strFileName, strLog);
        }
    }
}
